package org.zls.client;

import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.VerticalPanel;

public class MyCoursesTab extends Tab {

	// TODO: We may have a special table of the format
	// course_id mon tue wed thu fri start end
	// for the calendar.
	private CourseTable table;
	private VerticalPanel panel;

	public static TabInfo init() {
		return new TabInfo("My Courses", "<h2> My Courses! </h2>") {

			public Tab createInstance() {
				return new MyCoursesTab();
			}

			public String getColor() {
				return "#bf2a2a";
			}

			public void setTitle() {

				Window.setTitle("HSpot - My Courses");
			}
		};
	}

	public MyCoursesTab() {

		table = new CourseTable();
		panel = new VerticalPanel();
		panel.add(table);
		initWidget(panel);
	}

	public void onShow() {
		table.onShow();
	}
}
